home *** CD-ROM | disk | FTP | other *** search
- Path: news.hds.co.uk!john
- From: Gary Walsh <Gary_Walsh@spire.hds.co.uk>
- Newsgroups: comp.lang.c,comp.os.ms-windows.nt.misc,comp.programming,comp.std.c,comp.unix.aix
- Subject: Re: function pointers
- Date: 1 Feb 1996 10:05:36 GMT
- Organization: Hitachi Data Systems
- Message-ID: <4eq39g$4i9@willow.hds.co.uk>
- References: <4eogio$gt0@giga.bga.com> <4eohgr$gt0@giga.bga.com>
- NNTP-Posting-Host: hdsep.hds.co.uk
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 16bit)
-
- makuch@bga.com (Michael Makuch) wrote:
- >In article <4eogio$gt0@giga.bga.com>, makuch@bga.com says...
- >>
- >>The following c code segment compiles and works on
- >>NT MSVC++ and on SVR4 C compiler, but errors out
- >>on AIX with a type mismatch;
- >>
- >>struct foostruct1 * myfoo1();
- >>struct foostruct2 * myfoo2();
- >>void *(*ptr)();
-
- Make that:
-
- typedef void *(*fptr)();
- fptr ptr;
-
- >>
- >>ptr = myfoo1;
- >>[snip]
- >>ptr = myfoo2;
- >>
- >
- >Oops. What I meant to say at the end there was that
- >
- >prt = (void *)myfoo1();
-
- Try:
-
- ptr = (fptr) myfoo1();
-
- >
- >doesn't work either.
- >
- >Thanx.
- >mkm@abm.austin.tx.us
- >
-
-
-
- --
- _____________________________________________________________________
- Gary Walsh E-mail: Gary_Walsh@spire.hds.co.uk
- Open Systems Product Specialist Phone: +44 1753 618806
- Hitachi Data Systems Fax: +44 1753 618576
- Sefton Park
- Stoke Poges Disclaimer: My views, not HDS'
- Buckinghamshire SL2 4HD
- England
- _____________________________________________________________________
-
-
-